<%--
    Document   : donhang_chitiet
    Created on : Dec 19, 2011, 8:55:24 PM
    Author     : kydrenw
--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<div class="box-head">Chi tiết hóa đơn ${hoadon.mahd}</div>

<table width="100%">
    <tr>
        <td class="tbhead">Sản phẩm</td>
        <td class="tbhead">Số lượng</td>
        <td class="tbhead">Đơn giá</td>
        <td class="tbhead">Thành tiền</td>
        <td class="tbhead">Tình trạng</td>
        <td class="tbhead">Thao tác</td>
    </tr>
    <c:forEach var="item" items="${dsChiTiet}">
    <tr>
        <td class="tbcontent">${item.sanpham.tensp}</td>
        <td class="tbcontent">${item.soluong}</td>
        <td class="tbcontent">${item.dongia}</td>
        <td class="tbcontent">${item.soluong*item.dongia}</td>
        <td class="tbcontent">${item.tinhtrang.ten}</td>

        <td class="tbcontent">
            <input title="Duyệt" type="button" class="btn btnSubmit" onclick="window.location='donhang.htm?action=duyet&mahd=${hoadon.mahd}&masp=${item.sanpham.masp}'"/>
            <input title="Hủy" type="button" class=" btn btnDel" onclick="return confirm('Hủy ?'), window.location='donhang.htm?action=huy&mahd=${hoadon.mahd}&masp=${item.sanpham.masp}'"/>
        </td>
    </tr>
    </c:forEach>
    <tr>
        <td colspan="3" class="tbbottom textright">Tổng tiền</td>
        <td colspan="3" class="tbbottom textleft">${hoadon.tongtien}</td>
    </tr>
</table>
<div class="command">
    <input type="button" class="button" value="Quay lại" onclick="window.location='donhang.htm'"/>
</div>